
import { lazy} from 'react'
import  {Routerconfig} from '../type'

// 表单页子级
export const FormChildren:Array<Routerconfig> = [
    {
        path:"/home/pagemanagement/formpage/baseform",
        title:"基础表单",
        element:lazy(()=>import('../components/GreatGrandchildren/BaseForm'))
    },
    {
        path:"/home/pagemanagement/formpage/stepsheet",
        title:"步骤表单",
        element:lazy(()=>import('../components/GreatGrandchildren/StepSheet'))
    },
    {
        path:"/home/pagemanagement/formpage/advancedform",
        title:"高级表单",
        element:lazy(()=>import('../components/GreatGrandchildren/AdvancedForm'))
    }
]

// 表格管理页子级
export const TableChildren:Array<Routerconfig> = [
    {
        path:"/home/pagemanagement/formmanagementpage/basetable",
        title:"基础表格",
        element:lazy(()=>import('../components/GreatGrandchildren/BaseTable'))
    },
    {
        path:"/home/pagemanagement/formmanagementpage/embeddedtable",
        title:"内嵌表格",
        element:lazy(()=>import('../components/GreatGrandchildren/EmbeddedTable'))
    },
    {
        path:"/home/pagemanagement/formmanagementpage/slidingtable",
        title:"滑动表格",
        element:lazy(()=>import('../components/GreatGrandchildren/SlidingTable'))
    },
    {
        path:"/home/pagemanagement/formmanagementpage/editabletable",
        title:"可编辑Table",
        element:lazy(()=>import('../components/GreatGrandchildren/EditableTable'))
    },
    {
        path:"/home/pagemanagement/formmanagementpage/importexcel",
        title:"导入Excel",
        element:lazy(()=>import('../components/GreatGrandchildren/ImportExcel'))
    }
]

// 列表页子级
export const ListPageSelf:Array<Routerconfig> = [
    {
        path:"/home/pagemanagement/listpage/baselist",
        title:"基础列表",
        element:lazy(()=>import('../components/GreatGrandchildren/BaseList'))
    },
    {
        path:"/home/pagemanagement/listpage/cardlist",
        title:"卡片列表",
        element:lazy(()=>import('../components/GreatGrandchildren/CardList'))
    },
    {
        path:"/home/pagemanagement/listpage/searchlist",
        title:"搜索列表",
        element:lazy(()=>import('../components/GreatGrandchildren/SearchList'))
    }
]

// 异常页面子级
export const AbnormalPageSelf:Array<Routerconfig> = [
    {
        path:'/home/pagemanagement/abnormalpage/fourandfour',
        title:"404",
        element:lazy(()=>import('../components/GreatGrandchildren/FourAndFour'))
    },
     {
        path:'/home/pagemanagement/abnormalpage/fiveandfive',
        title:"505",
        element:lazy(()=>import('../components/GreatGrandchildren/FiveAndFive'))
    }
]

//  编辑器子级
export const EditorChildren:Array<Routerconfig> = [
    {
        path:'/home/feature/editor/richtexteditor',
        title:"富文本编辑器",
        element:lazy(()=>import('../components/GreatGrandchildren/RichTextEditor'))
    },
    {
        path:'/home/feature/editor/markdown',
        title:"markdown",
        element:lazy(()=>import('../components/GreatGrandchildren/MarkDown'))
    }
]

// 大屏管理子级
export const ScreenChildren:Array<Routerconfig> = [
    // 就业态势
    {
        path:"/home/largescreenmanagement/employmentsituation",
        title:"就业态势",
        element:lazy(()=>import('../components/Grandchildren/EmploymentSituation'))
    },
    // 智能检测
    {
        path:'/home/largescreenmanagement/intelligentdetection',
        title:"智能检测",
        element:lazy(()=>import('../components/Grandchildren/IntelligentDetection'))
    },
    // 安防管理
    {
        path:"/home/largescreenmanagement/securitymanagement",
        title:"安防管理",
        element:lazy(()=>import('../components/Grandchildren/SecurityManagement'))
    },
    // 设备运维
    {
        path:'/home/largescreenmanagement/equipmentoperationandmaintenance',
        title:"设备运维",
        element:lazy(()=>import('../components/Grandchildren/EquipmentOperationAndMaintenance'))
    }
]

// 页面管理子级
export const PageChildren:Array<Routerconfig> = [
    // 表单页
    {
        path:"/home/pagemanagement/formpage",
        title:"表单页",
        element:lazy(()=>import('../components/Grandchildren/FormPage')),
        children:FormChildren
    },
    // 表格管理页
    {
        path:"/home/pagemanagement/formmanagementpage",
        title:"表格管理页",
        element:lazy(()=>import('../components/Grandchildren/FormManagementPage')),
        children:TableChildren
    },
    // 列表页
    {
        path:"/home/pagemanagement/listpage",
        title:"列表页",
        element:lazy(()=>import('../components/Grandchildren/ListPage')),
        children:ListPageSelf
    },
    // 异常页面
    {
        path:"/home/pagemanagement/abnormalpage",
        title:"异常页面",
        element:lazy(()=>import('../components/Grandchildren/AbnormalPage')),
        children:AbnormalPageSelf
    }
]

// 图形图表子级
export const GraphChildren:Array<Routerconfig> = [
    {
        path:'/home/graph/map',
        title:'地图',
        element:lazy(()=>import('../components/Grandchildren/Map'))
    },
    {
        path:'/home/graph/radarmap',
        title:"雷达图",
        element:lazy(()=>import('../components/Grandchildren/RadarMap'))
    },
    {
        path:'/home/graph/barchart',
        title:"柱状图",
        element:lazy(()=>import('../components/Grandchildren/BarChart'))
    },
    {
        path:'/home/graph/linechart',
        title:'折线图',
        element:lazy(()=>import('../components/Grandchildren/LineChart'))
    }
]

// 功能子级
export const FeatureChildren:Array<Routerconfig> = [
    {
        path:"/home/feature/watermark",
        title:"水印",
        element:lazy(()=>import('../components/Grandchildren/Watermark'))
    },
    {
        path:'/home/feature/digitalanimation',
        title:"数字动画",
        element:lazy(()=>import('../components/Grandchildren/DigitalAnimation'))
    },
    {
        path:"/home/feature/pictureupload",
        title:"图片上传",
        element:lazy(()=>import('../components/Grandchildren/PictureUpload'))
    },
    
    {
        path:"/home/feature/fileupload",
        title:"文件上传",
        element:lazy(()=>import('../components/Grandchildren/FileUpload'))
    },
    {
        path:"/home/feature/filepreview",
        title:"文件预览",
        element:lazy(()=>import('../components/Grandchildren/FilePreview'))
    },
    
    {
        path:"/home/feature/editor",
        title:"编辑器",
        element:lazy(()=>import('../components/Grandchildren/Editor')),
        children:EditorChildren
    },
    {
        path:"/home/feature/cryptographicstrength",
        title:"密码强度",
        element:lazy(()=>import('../components/Grandchildren/CryptographicStrength'))
    },
    {
        path:"/home/feature/verificationcomponent",
        title:"验证组件",
        element:lazy(()=>import('../components/Grandchildren/VerificationComponent'))
    },
    {
        path:"/home/feature/introductionpage",
        title:'引导页',
        element:lazy(()=>import('../components/Grandchildren/IntroductionPage'))
    }, 
    {
        path:"/home/feature/embeddedpage",
        title:"内嵌页",
        element:lazy(()=>import('../components/Grandchildren/EmbeddedPage'))
    }
]

// 自定义指令子级
export const CustomChildren:Array<Routerconfig> = [
    {
        path:"/home/custominstruction/copy",
        title:"复制",
        element:lazy(()=>import('../components/Grandchildren/Copy'))
    },
    {
        path:"/home/custominstruction/drag",
        title:"拖拽",
        element:lazy(()=>import('../components/Grandchildren/Drag'))
    },
    {
        path:"/home/custominstruction/antishakeinstruction",
        title:"防抖指令",
        element:lazy(()=>import('../components/Grandchildren/AntiShakeInstruction'))
    },
    {
        path:"/home/custominstruction/throttleinstruction",
        title:"节流指令",
        element:lazy(()=>import('../components/Grandchildren/ThrottleInstruction'))
    }
]

// 二级路由
export const Childrenroutes:Array<Routerconfig> = [
    // 首页
    {
        path:"/home/homePage",
        title:'首页',
        element:lazy(()=>import('../components/Children/HomePage'))
    },
    // 大屏管理
    {
        path:"/home/largescreenmanagement",
        title:'大屏管理',
        element:lazy(()=>import('../components/Children/LargeScreenManagement')),
        children:ScreenChildren
    },
    // 知识点
    {
        path:"/home/knowledgepoint",
        title:'知识点',
        element:lazy(()=>import('../components/Children/KnowledgePoint')),
        children:[
            {
                path:"/home/knowledgepoint/keepalive",
                title:'KeepAlive',
                element:lazy(()=>import('../components/Grandchildren/KeepAlive'))
            }
        ]
    },
    // 页面管理
    {
        path:"/home/pagemanagement",
        title:"页面管理",
        element:lazy(()=>import('../components/Children/PageManagement')),
        children:PageChildren
    },
    // 图形图表
    {
        path:"/home/graph",
        title:"图形图表",
        element:lazy(()=>import('../components/Children/Graph')),
        children:GraphChildren
    },
    // 功能
    {
        path:"/home/feature",
        title:"功能",
        element:lazy(()=>import('../components/Children/Feature')),
        children:FeatureChildren
    },
    // 自定义指令
    {
        path:"/home/custominstruction",
        title:"自定义指令",
        element:lazy(()=>import('../components/Children/CustomInstruction')),
        children:CustomChildren
    },
    // 图形编辑器
    {
        path:"/home/graphiceditor",
        title:"图形编辑器",
        element:lazy(()=>import('../components/Children/GraphicEditor')),
        children:[
            {
                path:'/home/graphiceditor/flowchart',
                title:'流程图',
                element:lazy(()=>import('../components/Grandchildren/FlowChart'))
            }
        ]
    },
    // 视频播放器
    {
        path:"/home/videoplayer",
        title:"视频播放器",
        element:lazy(()=>import('../components/Children/VideoPlayer')),
        children:[
            {
                path:"/home/videoplayer/videoplayer",
                title:"视频播放器",
                element:lazy(()=>import('../components/Grandchildren/VideoPlayer'))
            }
        ]
    },
    // 数据统计
    {
        path:"/home/datastatistics",
        title:"数据统计",
        element:lazy(()=>import('../components/Children/DataStatistics')),
        children:[
            {
                path:'/home/datastatistics/itemone',
                title:"项目一",
                element:lazy(()=>import('../components/Grandchildren/ItemOne'))
            }
        ]
    },
    // 个人中心
    {
        path:"/home/individualcenter",
        title:"个人中心",
        element:lazy(()=>import('../components/Children/IndividualCenter')),
        children:[
            {
                path:'/home/individualcenter/aboutme',
                title:'关于我',
                element:lazy(()=>import('../components/Grandchildren/AboutMe'))
            }
        ]
    }
]

// 一级路由
export const routes:Array<Routerconfig> = [
    {
        path:'/',
        to:'/login'
    },
    {
        path:'/login',
        element:lazy(()=>import('../view/Login')),
        title:"登录页"
    },
    {
        path:"/home",
        element:lazy(()=>import('../view/Home')),
        title:'首页',
        children:Childrenroutes
    },
    {
        path:'*',
        element:lazy(()=>import('../view/NotFound')),
        title:'404页'
    }
]